package com.management.department.teacherinfosystem.Repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import com.management.department.teacherinfosystem.Entity.TalentHonor;

public interface TalentHonorRepository extends JpaRepository<TalentHonor, Long>, JpaSpecificationExecutor<TalentHonor> {
	List<TalentHonor> findByUserId(Long userId);

	@Query("select t from TalentHonor t order by t.selectionDate desc, t.createdAt desc")
	List<TalentHonor> findAllOrdered();
} 